/**
 * 叫号屏使用
 */
export const DevStateOptions = [
  {label: "空闲", value: 0},
  {label: "已领用", value: 5},
  {label: "已装机", value: 10},
  {label: "已遗失", value: 20},
  {label: "已损坏", value: 30},
  {label: "维修中", value: 40},
  {label: "已报废", value: 50}
]

export const tranlateDevState = (state) => {
  const stateOption = DevStateOptions.find(obj => obj.value === state)
  return  undefined !== stateOption ? stateOption.label : ''
}

/**
 * 叫号屏使用
 */
export const queueStatusConvert = (status: number) => {
  if (3 === status)
    return '已过号-排队';
  else if (5 === status)
    return '已过号';
  else if (7 === status)
    return '已过号-安装';
  else if (10 === status)
    return '排队中';
  else if (15 === status)
    return '已召回';
  else if (17 === status)
    return '已召回-安装';
  else if (20 === status)
    return '就诊准备';
  else if (30 === status)
    return '就诊中';
  else if (33 === status)
    return '已领用';
  else if (36 === status)
    return '安装中';
  else if (40 === status)
    return '已就诊';
  else
    return '未定义';

}
